package com.t2t.top.action.$15observer;

/**
 * 观察者模式
 * <p/>
 * 场景：类似于邮件订阅和RSS订阅
 */
public class ObserverTest {

    public static void main(String[] args) {
        Subject sub = new MySubject();
        sub.add(new Observer1());
        sub.add(new Observer2());

        sub.operation();
    }

}  